package model

import modelApp.EdicionSenhasAppModel
import org.uqbar.arena.layout.VerticalLayout
import org.uqbar.arena.widgets.Panel
import org.uqbar.arena.windows.WindowOwner
import templates.EdicionAtributos
import templates.MyOwnSimpleWindow

class EditarSenhasParticularesView extends MyOwnSimpleWindow<EdicionSenhasAppModel>{

	@Property EdicionAtributos template = new EdicionAtributos
		
	new(WindowOwner parent, Villano villano) {
		super(parent, new EdicionSenhasAppModel(villano) )
	}
	
	override createContents(Panel mainPanel) {
		this.setTitle("Editar Señas Particulares")
		mainPanel.setLayout(new VerticalLayout)
		
		this.template.listaEliminable(mainPanel,"Señas Particulares",
						"villanoSeleccionado.senhas", "senhaDel",[| modelObject.quitarSenhaParticular ])
		
		this.template.agregarAtributoTBox(mainPanel,"nuevaSenha",[| modelObject.agregarSenhaParticular /*-----> */  modelObject.nuevaSenha = " " ],
						[|close])	
	}
	
}